import React from 'react';
import PropTypes from 'prop-types';

export default function StudentList({ stuList }) {
    const list = stuList.map(item => <li key={item.id}>{item.name}，{item.sex === 1 ? '男' : '女'}</li>)

    return (
        <ul>
            {list}
        </ul>
    )
}


StudentList.defaultProps = {
    stuList: [],
    // page: 1
}

StudentList.propTypes = {
    stuList: PropTypes.array.isRequired
    // page: PropTypes.number.isRequired
}
